<template>
    <el-drawer v-model="visible" :title="title" :before-close="onClose" direction="rtl" :size='size'
        custom-class="demo-drawer">
        <el-scrollbar>
            <slot name="content"></slot>
        </el-scrollbar>
    </el-drawer>
</template>

<script setup lang='ts'>
import { ref, reactive } from 'vue'

const props = defineProps({
    title: {
        type: String,
        default: '请操作',
    },
    visible: {
        type: Boolean,
        default: false,
    },
    size: {
        type: String,
        default: '30%',
    }
})

const emit = defineEmits(['onClose',])

// 关闭弹窗
const onClose = () => {
    emit('onClose')
}


</script>

<style scoped lang='scss'>
</style>